# from alisuretool.Tools   import Tools
# from astroid
# from 
from os.path import dirname, join
from harzvatool.Tools  import Tools
from harzvatool  import tools
Tools.print('111')
a=Tools.get_xdir('/home/ubuntu/Dataset/Partition1/hzh/hzh_d/harzvatool/__init__.py',1)
print(a)
# tools.print('aaaa')

# from harzvatool import get_logger,mk_dir
a='1111'
b='22222'
txt_path='/home/ubuntu/Documents/hzh/setup/harzvatooltest.txt'
Tools.makedirs(txt_path)
Tools.print("load feature encoder success from {}".format(a),txt_path=txt_path)
Tools.print("load feature encoder success from {}".format(b),txt_path=txt_path)

Tools.makedirs(('/home/ubuntu/Documents/hzh/setup/harzvatool/test.log'))
logger=Tools.get_logger(name='harzva',log_file='/home/ubuntu/Documents/hzh/setup/harzvatool/test.log')

Tools.print_log(msg='test',logger=logger)#printl  单独的信息

Tools.print_log(msg=a,logger=logger)#printl  单独的信息

logger.info('DataParallel is DataParallel')
# print(Tools.collect_env())

version_file = './VERSION.py'
with open(join(dirname(__file__),version_file), 'r') as f:
    a=exec(compile(f.read(), version_file, 'exec'))
    print(f.read())
    print(compile(f.read(), version_file, 'exec'))
    print(a)
    # f.close() 
    #mode：必需。指定编译代码的种类。可以指定为 exec, eval, single。其中：eval - 源是单个表达式；exec- 源是语句块；single - 源是单个交互式语句。
    # print(locals())
    # print(globals())
locals()['__version__']#locals()函数以字典的形式返回当前函数内的局域作用域下的所有标识符

# print(locals()['__version__'])
# get_version_py()